package com.pilipili.zeus.eduService.controller;

import com.pilipili.commonutils.Result;
import com.pilipili.zeus.eduService.service.EduCourseDescriptionService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 番剧介绍
 *
 * @author Unlimited_Blade_Works
 * @since 2021-06-06
 */
@RestController
@RequestMapping("/eduService/CourseDescription")
public class CourseDescriptionController {
    @Autowired
    EduCourseDescriptionService descriptionService;
    @ApiOperation(value = "读取CourseDescriptionExcel中的表格,写入数据库")
    @PostMapping("addCourseDescription")
    public Result addCourseDescription(MultipartFile file){
        descriptionService.saveCourseDescriptionDataByExcel(file,descriptionService);
        return Result.ok();
    }
}
